module tests.nocomp.Issue293 where


data Log t = LogA { message :: String,
                    integer :: Maybe t } |
             LogB { message :: String,
                    boolean :: Bool }
newtype Logger t a = Logger { runLog :: (a, [Log t]) }
instance Monad (Logger t) where
  pure a = Logger (a, [])
  (Logger (a, xs)) >>= f = Logger (a', xs ++ xs')
    where (a', xs') = Logger.runLog $ f a
tell s = Logger ((), s)
